package com.rz.htk.dubbo.service;

import com.alibaba.fastjson.JSONArray;
import consumer.CountryService;
import consumer.ZoneService;
import consumer.model.Country;
import consumer.model.Zone;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName ICountryService
 * @Description 国家/地区service
 * @Author maweiyue
 * @Date 2019/3/26 20:37
 */
@Service
public class SysZoneService {
    @Reference(version = "1.0.0", url = "dubbo://127.0.0.1:12345")
    private ZoneService zoneService;

    /**
     * 根据国家代码和邮编获取分区号
     * @param country 国家代码
     * @param fromZip 出发地邮编
     * @param fromZip 目的地邮编
     * @return
     */
    public Zone getByContryAndZip(String country, String fromZip, String toZip){
        return zoneService.getByContryAndZip(country, fromZip, toZip);
    }
}
